package com.tegtech.module.captcha.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tegtech.module.captcha.domain.CaptchaRule;
import com.tegtech.module.captcha.service.AbstractCaptchaMessageService;
import com.tegtech.module.sms.service.IMessageService;

/**
 * 手机验证码实现类
 * @Author Jun
 * @date 2021年5月20日 下午4:40:21
 */
@Service
public class MobileCaptchaMessage extends AbstractCaptchaMessageService {
	
	@Autowired
	private IMessageService messageService;

	@Override
	protected void sendCaptchaMessage(String account, String code, CaptchaRule captchaRule) {
		messageService.sendMessage(account, captchaRule.getTemplate(), "{\"code\":" + "\"" + code + "\"}");
	}

}
